<template>
    <div class="my-music-list app-card">
        <div class="title-line">
            <div class="title">我的歌单</div>
            <div class="more btn-style">创建歌单</div>
        </div>
        <div class="content hide-scrollbar">
            <div class="music-list">
                <div class="item" v-for="item in play_list" :key="item.id">
                    <div class="img"></div>
                    <div class="info">
                        <div class="title text-ellipsis">{{ item.title }}</div>
                        <div class="count"><span>{{ item.count }}</span> 首音乐</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script setup>
import { ref } from 'vue';

let play_list = ref([
    {
        id: 1,
        img: '',
        title: '歌单名称1',
        count: 3,
    },
    {
        id: 2,
        img: '',
        title: '歌单名称2',
        count: 10,
    },
    {
        id: 3,
        img: '',
        title: '歌单名称3',
        count: 0,
    }
])
</script>

<style scoped lang="less">
.my-music-list .music-list {
    display: flex;
    flex-direction: column;
    gap: 3vw;

    .item {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 3vw;

        .img {
            --size: 15vw;
            width: var(--size);
            height: var(--size);
            border-radius: 2vw;
            background-color: var(--loading-color);
        }

        .info {
            flex: 1;

            .title {
                font-size: 4vw;
                color: #000;
            }

            .count {
                font-size: 3vw;
                color: #999;

                span {
                    font-size: 3vw;
                }
            }
        }
    }
}
</style>